How many animation frames a sprite asset has. The asset-level twin of frame_count below: frame_count always answers for whichever sprite THIS instance currently shows; sprite_frames answers for any sprite asset you name, including one this instance is not showing, or never shows at all.
Sega Genesis: not built yet
On other consoles this differs: see Side by side and How the consoles differ.
sprite_frames(spr) -> int| Name | Type |
|---|---|
spr | sprite |
int
How many animation frames a sprite asset has - the asset-level twin of frame_count: frame_count always answers for whichever sprite THIS instance currently shows, while sprite_frames answers for any sprite asset you name, including one this instance is not showing right now, or ever.
frame = sprite_frames(spr_doc_hero) - 1;Jumps straight to the last frame of spr_doc_hero - useful for freezing an animation on its final pose without hard-coding how many frames that sprite's own art happens to have.
Same compile-time read as sprite_width — see its own gba note.